package com.example.peibei.ui.adapter;

import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
import com.bumptech.glide.request.RequestOptions;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.dingtao.common.bean.MyFollow;
import com.dingtao.common.bean.SearchResult;
import com.example.peibei.R;
import com.example.peibei.ui.utils.LevelImage;

import java.util.List;

public class MyFollowAdapter extends BaseQuickAdapter<MyFollow.RecordsDTO, BaseViewHolder> {
    public MyFollowAdapter(@Nullable List<MyFollow.RecordsDTO> data) {
        super(R.layout.item_my_follow, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MyFollow.RecordsDTO item) {
        ImageView head = helper.getView(R.id.iv_head);
        Glide.with(getContext()).load(item.getImageUrl()).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(head);
        helper.setText(R.id.tv_name,item.getNickName());
    }
}
